<!--
Q-Project
home HTML
Copyright (C) 2010 by Andres Rocha, Miguel Ordo/ez, Edgar Sotelo
 
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.
 
You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
-->

{% extends "base.html" %}

{% block title %}BIENVENIDO!{% endblock %}

{% block main %}
    <div class="box">
        <h1>Bienvenido {{user}}</h1>
        <table>
            <tr><h3>{{msg}}</h3></tr>
                <th><a href="Q/editprofile/">Editar Perfil</a></th>
                <th><a href="Q/topics/">Agregar Topico</a></th>
                <th>
                    <form action="Q/logout/" method="post">
                        <input type="submit" value="Cerrar Sesion">
                    </form>
                </th>
            </tr>
        </table>
    </div>
    
    <div class="leftcolumn">
    <h2>Topicos</h2>
        <ul>
            {% for var in topics %}
                <li>{{var}}</li>
            {% endfor %}
        </ul>
    </div>
        
    <div class="rightcolumn">           
        <form action="Q/savequestion/" method="post">
            <table>
                {{question}}
                <tr><th><td><input type="submit" value="Preguntar"></td></th></tr>
            </table>
        </form>
    </div>
    
    <div class="content">
        <h3>Preguntas hechas por ti</h3>
            {% for x in questions %}
                <div class="{% cycle 'question2' 'question1' %}">
                    <form action = "Q/replyquestion/" method="post">
                    {% for y in x %}
                        {{y}}
                    {% endfor %}
                    <input type="submit" value="Responder">
                    </form>
                </div>
            {% endfor %}
        
        <h3>Preguntas hechas por los demas</h3>
            {% for x in questionsOthers %}
                <div class="{% cycle 'question2' 'question1' %}">
                    <form action = "Q/replyquestion/" method="post">
                    {% for y in x %}
                        {{y}}
                    {% endfor %}
                    <input type="submit" value="Responder">
                    </form>
                </div>
            {% endfor %}
        
    </div>
{% endblock %}